$OpenBSD: patch-xuvmstat_c,v 1.6 2017/04/24 02:21:22 jca Exp $
--- xuvmstat.c.orig	Fri Sep  9 15:38:48 2005
+++ xuvmstat.c	Mon Apr 24 04:19:26 2017
@@ -24,16 +24,15 @@
  * xuvmstat.c
  */
 
+#include <err.h>
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/param.h>
 #include <sys/errno.h>
+#include <sys/sysctl.h>
 #include <sys/time.h>
-#if (__NetBSD_Version__ < 105000000)
-#include <vm/vm.h>
-#endif
 #include <uvm/uvm_extern.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -46,12 +45,14 @@ void redraw __P((struct xdpy *, Window, GC, int));
 
 u_long black, white, red, green, blue, magenta, orange, purple;
 XFontStruct *fnt_fixed, *fnt_8x13bold;
+#define cexp curexp
 struct uvmexp cexp, oexp;	/* current, old */
 struct timeval tv, otv;
 struct graph *gp_faults, *gp_traps, *gp_intrs, *gp_ctx;
 
 #define WIDTH 300
 
+int
 main(argc, argv)
 
 int argc;
@@ -106,7 +107,7 @@ char **argv;
   gettimeofday(&otv, NULL);
 
   {
-    int count = 0, xfd = ConnectionNumber(xdpy.dpy), retval;
+    int xfd = ConnectionNumber(xdpy.dpy), retval;
     struct timeval now, incr, ping, timer;
     XEvent event;
    
@@ -154,6 +155,8 @@ char **argv;
 
   XFreeFont(xdpy.dpy, fnt_fixed);
   XCloseDisplay(xdpy.dpy);
+
+  return (0);
 }
 
 /*
@@ -214,6 +217,7 @@ int was_timeout;
 		  vals, colors, white);
   }
 
+#ifdef notyet
   y += 8;
   {
     static char *names[] = { "file", "anon", "exec", "free", "kernel" };
@@ -237,6 +241,7 @@ int was_timeout;
     y = draw_barbox(xdpy, win, gc, fnt_fixed, 5, 295, y, 5, cexp.npages, names,
                   vals, colors, white);
   }
+#endif
 
   y += 8;
 
@@ -353,8 +358,8 @@ int was_timeout;
       static u_long color[3];
       init = 1;
       before[0] = &oexp.swtch; after[0] = &cexp.swtch; color[0] = black;
-      before[1] = &oexp.swapins; after[1] = &cexp.swapins; color[1] = green;
-      before[2] = &oexp.swapouts; after[2] = &cexp.swapouts; color[2] = red;
+      before[1] = &oexp.pgswapin; after[1] = &cexp.pgswapin; color[1] = green;
+      before[2] = &oexp.pgswapout; after[2] = &cexp.pgswapout; color[2] = red;
       gp_ctx = create_graph(3, "SWITCH/SWAP", names, before, after, color, white);
     }  
 
